Page({
    data:{
        title:"无数",
        time:"2023-06-16",
        singer:"薛之谦",
        url:"http://p1.music.126.net/z0b7uhQmjXdFqkgBTSpsfA==/109951167891177817.jpg?param=120y120",
        list:[
            {
                id:1982706733,
                videoSrc:"http://link.hhtjim.com/163/1982706733.mp3",
                songname:"无数",
                name:"薛之谦",
            },
            {
                id:1906034595,
                videoSrc:"http://link.hhtjim.com/163/1906034595.mp3",
                songname:"凤毛麟角",
                name:"薛之谦",
            },
            {
                id:1861640530,
                videoSrc:"http://link.hhtjim.com/163/1861640530.mp3",
                songname:"变废为宝",
                name:"薛之谦",
            },
            {
                id:1982706731,
                videoSrc:"http://link.hhtjim.com/163/1982706731.mp3",
                songname:"你不是一个人",
                name:"张信哲 / 薛之谦",
            },
            {
                id:1954420092,
                videoSrc:"http://link.hhtjim.com/163/1954420092.mp3",
                songname:"可",
                name:"薛之谦 / 张靓颖",
            },
            {
                id:1915297033,
                videoSrc:"http://link.hhtjim.com/163/1915297033.mp3",
                songname:"男二号",
                name:"薛之谦",
            },
            {
                id:1982704623,
                videoSrc:"http://link.hhtjim.com/163/1982704623.mp3",
                songname:"守候",
                name:"薛之谦",
            },
            {
                id:1907820140,
                videoSrc:"http://link.hhtjim.com/163/1907820140.mp3",
                songname:"洛城",
                name:"薛之谦",
            },
            {
                id:1982706722,
                videoSrc:"http://link.hhtjim.com/163/1982706722.mp3",
                songname:"被人",
                name:"薛之谦",
            },
            {
                id:1964644539,
                videoSrc:"http://link.hhtjim.com/163/1964644539.mp3",
                songname:"关于你",
                name:"薛之谦",
            }
        ]
    },
    tomusic(event) {
        const item = event.currentTarget.dataset.item; // 获取当前点击的数据项
        const { id, videoSrc,songname,name } = item; // 从数据项中解构出
        const { list,url }=this.data
        wx.navigateTo({
            url: `/pages/music/music?id=${id}&videoSrc=${encodeURIComponent(videoSrc)}&songname=${songname}&name=${name}&url=${encodeURIComponent(url)}&list=${encodeURIComponent(JSON.stringify(list))}`,
          });
    }
})